Skip to main content

Search Image

Search image very precisely with luci.

Image Searching Using Agentic Search refers to an advanced method where AI agents autonomously perform image-based searches by understanding user queries, analyzing visual content, and retrieving relevant images from various sources.

Get the JSON Response

from Luci import search_images

query="Recent trends of AI?" # Define your query

print(search_images(query, max_results=3))

Here is the JSON responses. You can find image title, url and source.

[{'height': 2700, 'image': 'https://datasciencedojo.com/wp-content/uploads/emerging-AI-and-machine-learning-trends.png', 'source': 'Bing', 'thumbnail': 'https://tse4.mm.bing.net/th?id=OIP.6GePrr_X29tbbZN3y6KJKAHaHa&pid=Api', 'title': '2023 emerging AI and Machine Learning trends | Data Science Dojo', 'url': 'https://datasciencedojo.com/blog/ai-and-machine-learning-trends/', 'width': 2700}, {'height': 802, 'image': 'https://www.solulab.com/wp-content/uploads/2024/01/Top-Artificial-Intelligence-Trends-1200x802.jpg', 'source': 'Bing', 'thumbnail': 'https://tse2.mm.bing.net/th?id=OIP.hfnFtS_9eZ27UmYId8JwNwHaE8&pid=Api', 'title': 'Top Artificial Intelligence Trends | AI Trends', 'url': 'https://www.solulab.com/top-ai-trends-for-2024/', 'width': 1200}, {'height': 880, 'image': 'https://www.startus-insights.com/wp-content/uploads/2022/12/AI-trends-InnovationMap-StartUs-Insights-noresize.png', 'source': 'Bing', 'thumbnail': 'https://tse1.mm.bing.net/th?id=OIP._Jep5ulz0lEOxYq6Htu-LwHaFF&pid=Api', 'title': 'Top 10 AI Trends in 2023 | StartUs Insights', 'url': 'https://www.startus-insights.com/innovators-guide/ai-trends/', 'width': 1280}]

Get the joined response

Get the joined response in a precise manner and a structural format.

Here is the code, Let's explain one by one.

from Luci import Search

query = "Revmaxx LLC"
search_instance = Search(query)

results = search_instance.search_images(max_results=2)
search_instance.print_img_result(results)

Import Search from luci and then mention query. Use search_images function and use print_img_result to print the results.

The result should come like this: -

Result 1:                                                                     
Height: 500
Image: https://www.adproceed.com/wp-content/uploads/2024/04/401182-500x500.png
Source: Bing
Thumbnail: https://tse2.mm.bing.net/th?id=OIP.pNvB04G6-kjE0TjCGVEWfQHaHa&pid=Api
Title: Unlock Free SOAP Note Generation from RevMaxx AI - Ad Proceed
Url: https://www.adproceed.com/ads/unlock-free-soap-note-generation-from-revmaxx-ai/
Width: 500

Result 2:
Height: 1080
Image: https://media.licdn.com/dms/image/v2/D5622AQG1se2TP73iLg/feedshare-shrink_2048_1536/feedshare-shrink_2048_1536/0/1725684183008?e=2147483647&v=beta&t=lAx_XpFgsSOZMA-FEO17eNl_R7GTaeioUTMRfB29JXg
Source: Bing
Thumbnail: https://tse3.mm.bing.net/th?id=OIP.DOsI70eekNxElXFDqibyFQHaHa&pid=Api
Title: RevMaxx on LinkedIn: Exciting News for RevMaxx! RevMaxx is thrilled to ...
Url: https://www.linkedin.com/posts/revmaxx_exciting-news-for-revmaxx-revmaxx-is-thrilled-activity-7238044080797073408--1hr
Width: 1080